﻿//
// Created: 2018/11/4
// Author: chenqiang
//
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration;
using Model.Finance;

namespace Model.Finance.Map
{
    internal  class AccountBalanceMap:EntityTypeConfiguration< AccountBalance >    
    {
        public AccountBalanceMap()
        {
             this.ToTable("AccountBalance");
             this.HasKey(i => new { i.BalanceID });
             this.Property(i => i.BalanceID).HasColumnName("BalanceID");                     
             this.Property(i => i.UserId).HasColumnName("UserId");                     
             this.Property(i => i.CreateTime).HasColumnName("CreateTime");                     
             this.Property(i => i.BalanceMoney).HasColumnName("BalanceMoney");                     
             this.Property(i => i.BuinessCode).HasColumnName("BuinessCode");                     
             this.Property(i => i.OrgaCode).HasColumnName("OrgaCode");                     
             this.Property(i => i.RelationId).HasColumnName("RelationId");
             this.Property(i => i.AccountBalanceCode).HasColumnName("AccountBalanceCode");             
        }   
    }
    
     public static class AccountBalanceMapExtensions
    {
        public static void UserAccountBalanceMap(this DbModelBuilder pModelBuilder)
        {
            pModelBuilder.Configurations.Add(new AccountBalanceMap());
        }
    }
}